/**
 * 
 */
package com.wuka.controller;

import java.util.Date;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.wuka.bean.Demo;

/**
 * @author zhangliping
 *
 */
@RestController
@RequestMapping("/demo")
public class DemoController {

	@RequestMapping("/getDemo")
	public Demo getDemo() {
		Demo demo = new Demo();
		demo.setId(1);
		demo.setName("Angel");
		demo.setStartDate(new Date());
		return demo;
	}
	
	@RequestMapping("/zeroException")
	public int zeroException() {
		return 100/0;
	}
}
